import request from '@/utils/request'

// 查询科目章节信息列表
export function listSubjectItems(query) {
  return request({
    url: '/edu/subjectItems/list',
    method: 'get',
    params: query
  })
}

export function listItemExcludeChild(itemId) {
  return request({
    url: '/edu/subjectItems/list/exclude/' + itemId,
    method: 'get'
  })
}

// 查询科目章节信息详细
export function getSubjectItems(itemId) {
  return request({
    url: '/edu/subjectItems/' + itemId,
    method: 'get'
  })
}

// 新增科目章节信息
export function addSubjectItems(data) {
  return request({
    url: '/edu/subjectItems',
    method: 'post',
    data: data
  })
}

// 修改科目章节信息
export function updateSubjectItems(data) {
  return request({
    url: '/edu/subjectItems',
    method: 'put',
    data: data
  })
}

// 删除科目章节信息
export function delSubjectItems(itemId) {
  return request({
    url: '/edu/subjectItems/' + itemId,
    method: 'delete'
  })
}

// 导出科目章节信息
export function exportSubjectItems(query) {
  return request({
    url: '/edu/subjectItems/export',
    method: 'get',
    params: query
  })
}